<?php if (!defined('THINK_PATH')) exit(); /*a:6:{s:81:"/Applications/MAMP/htdocs/wifi/public/../application/admin/view/wechat/index.html";i:1531993132;s:72:"/Applications/MAMP/htdocs/wifi/application/admin/view/common/layout.html";i:1531800487;s:72:"/Applications/MAMP/htdocs/wifi/application/admin/view/common/header.html";i:1531800487;s:69:"/Applications/MAMP/htdocs/wifi/application/admin/view/common/nav.html";i:1531800487;s:70:"/Applications/MAMP/htdocs/wifi/application/admin/view/common/menu.html";i:1531800487;s:72:"/Applications/MAMP/htdocs/wifi/application/admin/view/common/footer.html";i:1531800487;}*/ ?>
﻿<!DOCTYPE HTML>
<html>
    <head>
        <title><?=$seo['title']?$seo['title']:config('SITE_NAME')?></title>
        <meta charset="UTF-8">
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link href="/static/hui/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" />
        <link href="/static/hui/h-ui.admin/css/H-ui.login.css" rel="stylesheet" type="text/css" />
        <link href="/static/hui/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" />
        <link href="/static/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
        <script type="text/javascript" src="/static/lib/layDate-v5.0.9/laydate/laydate.js"></script> 
        <link rel="Bookmark" href="<?=config('site_logo')?>" >
        <link rel="Shortcut Icon" href="<?=config('site_logo')?>" />
        <!--[if lt IE 9]>
        <script type="text/javascript" src="/lib/html5.js"></script>
        <script type="text/javascript" src="/lib/respond.min.js"></script>
        <![endif]-->
        <link rel="stylesheet" type="text/css" href="/static/hui/h-ui.admin/css/H-ui.admin.css" />
        <link rel="stylesheet" type="text/css" href="/static/hui/h-ui.admin/skin/default/skin.css" id="skin" />
        <!--[if IE 6]>
        <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
        <script>DD_belatedPNG.fix('*');</script>
        <![endif]-->
        <!--/meta 作为公共模版分离出去-->
    </head>
    <body>



<header class="navbar-wrapper">
    <div class="navbar navbar-fixed-top">
        <div class="container-fluid cl">
            <a class="logo navbar-logo f-l mr-10 hidden-xs" href="/admin/index"><?=config('site_name')?></a> 
            <a class="logo navbar-logo-m f-l mr-10 visible-xs" href="/admin/index"></a> 
            <span class="logo navbar-slogan f-l mr-10 hidden-xs"></span> 
            <a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;">&#xe667;</a>
            <nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
                <ul class="cl">
                    <li><?php echo $admininfo['mobile']; ?></li>
                    <li class="dropDown dropDown_hover"> <a href="#" class="dropDown_A"><i class="Hui-iconfont">&#xe6d5;</i></a>
                        <ul class="dropDown-menu menu radius box-shadow">
                            <li><a href="/admin/login/quit">退出</a></li>
                        </ul>
                    </li>
                    <li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A" title="换肤"><i class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
                        <ul class="dropDown-menu menu radius box-shadow">
                            <li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
                            <li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
                            <li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
                            <li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
                            <li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
                            <li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
    </div>
</header>
<!--_menu 作为公共模版分离出去-->
<aside class="Hui-aside">
    <div class="menu_dropdown bk_2">
        <?php foreach($menus as $menu) { ?>
        <dl id="menu-config">
            <dt <?php echo $controller==$menu['controller']?'class="selected"':'';?>><?php echo $menu['title']; ?><i class="Hui-iconfont menu_dropdown-arrow">&#xe6d5;</i></dt>
            <dd <?php echo $controller==$menu['controller']?'style="display:block;"':'';?>>
                <ul>
                    <?php foreach($menu['menus'] as $sub_menu) { ?>
                    <li <?php echo $controller==$sub_menu['controller']&&$action==$sub_menu['action']?'class="current"':'';?>>
                        <a href="/admin/<?=$sub_menu['controller']?>/<?=$sub_menu['action']?>" title="<?php echo $sub_menu['name']; ?><"><?php echo $sub_menu['title']; ?></a>
                    </li>
                    <?php } ?>
                </ul>
            </dd>
        </dl>
        <?php } ?>
    </div>
</aside>
<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
<!--/_menu 作为公共模版分离出去-->

 <section style="overflow-y: scroll;" class="Hui-article-box">
    <div class="panel panel-default">
	<div class="panel-header">公众号列表</div>
        <div class="panel-body">
            <article class="cl">
                <div class="cl pd-5 bg-1 bk-gray mt-20">
                    <span class="l"> 
                        <a href="javascript:;" onclick="layer_show('添加公众号', '/admin/wechat/addwechat')" class="btn btn-primary radius">
                            <i class="Hui-iconfont">&#xe600;</i>添加公众号
                        </a> 
                    </span>
                </div>
                <table class="table table-border table-bordered table-bg">
                    <thead>
                        <tr>
                            <th scope="col" colspan="9">列表</th>
                        </tr>
                        <tr class="text-c">
                            <th width="40">公众号名称</th>
                            <th width="40">公众号appid</th>
                            <th width="90">公众号appsecret</th>
                            <th width="90">门店ID</th>
                            <th width="90">创建时间</th>
                            <th width="100">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach($datalist as $k=>$v){ ?>
                        <tr class="text-c">
                            <td><?php echo $v['wechat_name']; ?></td>
                            <td><?php echo $v['appid']; ?></td>
                            <td><?=$v['appsecret']?></td>
                            <td><?php echo $v['shop_id']; ?></td>
                            <td><?=$v['create_time']?></td>
                            <td>
                                <a onclick="layer_show('编辑', '/admin/wechat/addwechat?id=<?php echo $v["id"]; ?>')" 
                                    class="ml-5 btn radius btn-primary">
                                     <i class="Hui-iconfont">&#xe6df;</i>编辑
                                 </a>
                                 <a onclick="delwechat(this, '<?php echo $v['id']; ?>')" class="btn radius btn-danger">
                                     <i class="Hui-iconfont">&#xe6e2;</i>删除
                                 </a>
                                <input type="button" id="flush" class="	btn btn-secondary radius" d-id="<?php echo $v['appid']; ?>" value="强制刷新配置">
                                <span></span>
                            </td>
                        </tr>
                        <?php } ?>
                    </tbody>
                </table>
                <div><?php echo $pager;?></div>
            </article>
        </div>
    </div>
</section>
<script type="text/javascript" src="/static/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript" src="/static/lib/datatables/1.10.0/jquery.dataTables.min.js"></script> 
<script type="text/javascript" src="/static/lib/laypage/1.2/laypage.js"></script> 
<script type="text/javascript">

function delwechat(obj,id){
    layer.confirm('确认要删除吗？',function(index){
        $.get('/admin/wechat/deletewechat?id='+id).then(function(res){
            if(res.code==0) {
                layer.msg(res.msg,{icon:1,time:1000});
                $(obj).parents("tr").remove();
            }else{
                layer.msg(res.msg);
            }
        })
    });
}
$(function () {
    $("#flush").click(function () {
        var appid=$(this).attr('d-id');
        layer.confirm('确认刷新连接wifi成功跳转配置？',function(index){
            $.ajax({
                url:'setFinshPage',
                type:'POST',
                data:{appid:appid},
                dataType:'JSON',
                success:function (data) {
                    layer.msg(data.msg);
                },error:function (data) {
                    layer.msg(data.msg);
                }
            })
        });

    })
})
</script> 

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="/static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="/static/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="/static/hui/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="/static/hui/h-ui.admin/js/H-ui.admin.page.js"></script> 
<script type="text/javascript" src="/static/common.js"></script> 
</body>
</html>